﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace models
{
    public class Cart
    {
        //购物车表 模型
        private int id;
        private int count;//数量
        private float sum;//合计
        private int userid;//用户id
        private int storeid;//店铺id
        private int proid;//商品id
        private string proName;//商品名
        private string proPic;//商品图片
        private string proSpeci;//商品规格
        private decimal proPrice;//商品单价
        private string storeName;//店家名字
        private string userName;//买家名字
        private decimal ssum;//单物品总价


        public Cart(decimal proPrice) 
        {
            this.proPrice = proPrice;//decimal
        }
        public Cart(decimal ssum, int id,int count,int proid,string proName,string proPic ,string proSpeci,decimal proPrice,int storeid,string storeName , int userid,string userName)
        {
            //购物车ID 数量 商品id 商品名 商品图片 规格 单价 店家id 店家 买家id 买家账号
            this.ssum=ssum;
            this.id = id;// int
            this.count = count;//int
            this.proid = proid;//int
            this.proName = proName;//string
            this.proPic = proPic;//string
            this.proSpeci = proSpeci;//string
            this.proPrice = proPrice;//decimal
            this.storeid = storeid;//int
            this.storeName = storeName;//string
            this.userid = userid;//int
            this.userName = userName;//string
        }
        public Cart() { }
        public Cart(string proSpeci) 
        {
            this.proSpeci = proSpeci;//string
        }
        public Cart(int count, float sum, int userid, int storeid, int proid)
        {
            this.count = count;
            this.sum = sum;
            this.userid = userid;
            this.storeid = storeid;
            this.proid = proid;
        }

        public Cart(int id, int count, float sum, int userid, int storeid, int proid)
        {
            this.id = id;
            this.count = count;
            this.sum = sum;
            this.userid = userid;
            this.storeid = storeid;
            this.proid = proid;
        }

        public int Id { get => id; set => id = value; }
        public int Count { get => count; set => count = value; }
        public float Sum { get => sum; set => sum = value; }
        public int Userid { get => userid; set => userid = value; }
        public int Storeid { get => storeid; set => storeid = value; }
        public int Proid { get => proid; set => proid = value; }
        public string ProName { get => proName; set => proName = value; }
        public string ProPic { get => proPic; set => proPic = value; }
        public string ProSpeci { get => proSpeci; set => proSpeci = value; }
        public decimal ProPrice { get => proPrice; set => proPrice = value; }
        public string StoreName { get => storeName; set => storeName = value; }
        public string UserName { get => userName; set => userName = value; }
        public decimal Ssum { get => ssum; set => ssum = value; }
    }
}
